Two step light curing of bonding agent and composite